﻿#ifndef COM_MANAGER_H
#define COM_MANAGER_H

#include "com_rs232.h"

#include <QMap>


class com_manager : public QObject
{
    Q_OBJECT
    static com_manager * mgr;

public:
    com_manager();
    static com_manager * instance();
    static QMap<QString, rs232com*> mapCom;

     QStringList comList;//串口号

    QString curComName;

    //QMap<QString, QString> com_map;

    void enum_com();

    rs232com * get_com(QString portName);
    void openAllCom();

    void openCom(QString comName);


    void close();

};

#endif // COM_MANAGER_H
